class Dog:
    def __init__(self,name):
        self.name=name
    def game(self):
        print(f'蹦蹦跳跳{self.name}')
class XiaotianDog:
    def game(self):
        print(f'飞上天{self.name}')
class Person:
    def __init__(self,name):
        self.name=name
    def game_withdog(self,dog:Dog):
        print(f'{self.name}和{dog.name}玩')
        dog.game()
wangcai=Dog('wangcai')
wangcai.game()
xiaoming=Person('xiaoming')
xiaoming.game_withdog(wangcai)#（）内需要传入旺财或者Dog才行
